package com.unireport.dbbean;

// Generated 2012-5-2 22:17:44 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * WebjobSyncQueue generated by hbm2java
 */
@Entity
@Table(name = "WEBJOB_SYNC_QUEUE", schema = "DATAMANAGER")
@SequenceGenerator(name="seq_webjob_exec_seri", sequenceName="seq_webjob_exec_seri",allocationSize=1)
public class WebjobSyncQueue implements java.io.Serializable {

	private int execSeri;
	private WebjobSyncDef webjobSyncDef;
	private String rpName;
	private Date insertTime;
	private Date lockTime;
	private String queueName;
	private int priority;
	private short status;
	private Integer lastSql;
	private int maxExec;
	private String smsPhone;

	public WebjobSyncQueue() {
	}

	public WebjobSyncQueue(int execSeri, String rpName, Date insertTime,
			Date lockTime, String queueName, int priority, int maxExec) {
		this.execSeri = execSeri;
		this.rpName = rpName;
		this.insertTime = insertTime;
		this.lockTime = lockTime;
		this.queueName = queueName;
		this.priority = priority;
		this.maxExec = maxExec;
	}

	public WebjobSyncQueue(int execSeri, WebjobSyncDef webjobSyncDef,
			String rpName, Date insertTime, Date lockTime, String queueName,
			int priority, short status, Integer lastSql, int maxExec,
			String smsPhone) {
		this.execSeri = execSeri;
		this.webjobSyncDef = webjobSyncDef;
		this.rpName = rpName;
		this.insertTime = insertTime;
		this.lockTime = lockTime;
		this.queueName = queueName;
		this.priority = priority;
		this.status = status;
		this.lastSql = lastSql;
		this.maxExec = maxExec;
		this.smsPhone = smsPhone;
	}

	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="seq_webjob_exec_seri")
	@Column(name = "EXEC_SERI", unique = true, nullable = false, precision = 8, scale = 0)
	public int getExecSeri() {
		return this.execSeri;
	}

	public void setExecSeri(int execSeri) {
		this.execSeri = execSeri;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "JOB_ID")
	public WebjobSyncDef getWebjobSyncDef() {
		return this.webjobSyncDef;
	}

	public void setWebjobSyncDef(WebjobSyncDef webjobSyncDef) {
		this.webjobSyncDef = webjobSyncDef;
	}

	@Column(name = "RP_NAME", nullable = false, length = 100)
	public String getRpName() {
		return this.rpName;
	}

	public void setRpName(String rpName) {
		this.rpName = rpName;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "INSERT_TIME", nullable = false, length = 7)
	public Date getInsertTime() {
		return this.insertTime;
	}

	public void setInsertTime(Date insertTime) {
		this.insertTime = insertTime;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "LOCK_TIME", nullable = false, length = 7)
	public Date getLockTime() {
		return this.lockTime;
	}

	public void setLockTime(Date lockTime) {
		this.lockTime = lockTime;
	}

	@Column(name = "QUEUE_NAME", nullable = false, length = 20)
	public String getQueueName() {
		return this.queueName;
	}

	public void setQueueName(String queueName) {
		this.queueName = queueName;
	}

	@Column(name = "PRIORITY", nullable = false, precision = 8, scale = 0)
	public int getPriority() {
		return this.priority;
	}

	public void setPriority(int priority) {
		this.priority = priority;
	}

	@Column(name = "STATUS", precision = 4, scale = 0)
	public short getStatus() {
		return this.status;
	}

	public void setStatus(short status) {
		this.status = status;
	}

	@Column(name = "LAST_SQL", precision = 8, scale = 0)
	public Integer getLastSql() {
		return this.lastSql;
	}

	public void setLastSql(Integer lastSql) {
		this.lastSql = lastSql;
	}

	@Column(name = "MAX_EXEC", nullable = false, precision = 8, scale = 0)
	public int getMaxExec() {
		return this.maxExec;
	}

	public void setMaxExec(int maxExec) {
		this.maxExec = maxExec;
	}

	@Column(name = "SMS_PHONE", length = 11)
	public String getSmsPhone() {
		return this.smsPhone;
	}

	public void setSmsPhone(String smsPhone) {
		this.smsPhone = smsPhone;
	}

}
